package com.yfp.client.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yfp.common.core.text.BigDecimal1Serializer;
import com.yfp.common.core.text.PlusSignBigDecimalSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 饮食日志-身体数据列表页面-返回值
 */
@Data
public class ClientHistoryInfoVO implements Serializable {

    private static final long serialVersionUID = 5857281647810665092L;

    /**
     * 主键
     */
    @Schema(description = "主键")
    private Long id;

    /**
     * 体重
     */
    @JsonSerialize(using = BigDecimal1Serializer.class)
    @Schema(description = "体重")
    private BigDecimal weight;

    /**
     * 身高
     */
    @Schema(description = "体重")
    private BigDecimal height;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 较上一次差值
     */
    @JsonSerialize(using = PlusSignBigDecimalSerializer.class)
    @Schema(description = "较上一次差值")
    private BigDecimal diff;
}
